package com.tsingteng.cosfun.ui.found;

import com.tsingteng.cosfun.bean.DataBean;
import com.tsingteng.cosfun.bean.FoundBean;
import com.tsingteng.cosfun.callback.RxObserver;
import com.tsingteng.cosfun.common.Config;
import com.tsingteng.cosfun.http.RxSchedulers;
import com.tsingteng.cosfun.mvp.module.BaseModel;

/**
 * 发现活动列表网络请求层
 * author  zht
 */
public class FoundModel extends BaseModel implements IFoundModel{
    @Override
    public void getFoundActivity(int page,RxObserver<FoundBean> callBack) {
        doRxRequest().getActivityList(page, Config.PAGE_SIZE).compose(RxSchedulers.io_main()).subscribe(callBack);
    }

    @Override
    public void readFoundActivity(long id, RxObserver<DataBean> callBack) {
        doRxRequest().showFoundActivityRead(id).compose(RxSchedulers.io_main()).subscribe(callBack);
    }
}
